/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is MaoBot.
 *
 * The Initial Developer of the Original Code is NoobSauce <tvilece@gmail.com>.
 * Portions created by NoobSauce are Copyright (C) 2011 NoobSauce. All Rights Reserved.
 *
 * Contributor(s):
 * tankgunk <tankgunk@gmail.com>
 *
 * ***** END LICENSE BLOCK ***** */
package org.maobot;
/* Should be able to refresh the pile, deal penalty cards, look
 * at any card in the pile or hands, and play cards.  Gameplay
 * and enforcement should be done by hand.
 */
/* Unfinished code, my bad.  Still mulling over how I/O ought to work, I have
 * stuff on paper for it.
 */
import java.util.Scanner;

public class Main {
	/**
	 * @param args
	 */
	enum Command{LOOK, MOVE, SHUFFLE}
	enum Quantity {ONE, MANY, ALL}
	enum Location {PILE, HAND, DECK}
	enum Place {TOP, BOTTOM}
	public Card send(Pile from, Pile to, int in, int out){//sends to top
		Card temp = from.lookAt(in);
		try{to.add(out, from.send(in));
		}catch(Exception e){
			return null;
		}
		return temp;
	}
	public Card[] send(Pile from, Pile to, int in, int infin, int outbegin){//sends to outbegin (an index)
		Card[] temp = from.lookRange(in, infin);
		try{
			to.putRange(outbegin, temp);
		}catch(Exception e){
			return null;
		}
		return temp;
	}
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		System.out.println("How many players?");
		Hand[] players = new Hand[in.nextInt()];
		System.out.println("How many separate decks?");
		Deck[] decks = new Deck[in.nextInt()];
		System.out.println("Assuming 1 set of cards per deck, ok?");
		{
			int i;
			if(!in.nextBoolean()){
				System.out.println("How many sets?");
				i = in.nextInt();
			}else{i = 1;}
			for(int j = 0; j < decks.length; j++){
				decks[j] = new Deck(i);
			}
		}
		System.out.println("How many piles?");
		Pile[] pile = new Pile[in.nextInt()];
		boolean over = false;
		String[] commands = null;
		Command cc = null;
		in.nextLine();
		String gen = new String("Broken syntax.");
		while(!over){//here's where wonderful commands happen
			commands = in.nextLine().split(", ");
			
		}
	}

}
